import request from '@/utils/request'
import type { Pet, ApiResponse } from '@/types'

export const petApi = {
  // 获取宠物信息
  getPetInfo(): Promise<ApiResponse<Pet>> {
    return request.get('/pet')
  },
  
  // 喂养宠物
  feedPet(foodType: string): Promise<ApiResponse<Pet>> {
    return request.post('/pet/feed', { foodType })
  },
  
  // 与宠物玩耍
  playWithPet(): Promise<ApiResponse<Pet>> {
    return request.post('/pet/play')
  },
  
  // 给宠物改名
  renamePet(petName: string): Promise<ApiResponse<Pet>> {
    return request.put('/pet/rename', { petName })
  }
}

